<template>
  <CusCard
    name="车辆监控"
    :content-style="{ height: '267px' }"
  >
    <div class="carMonitor-card">
      <div class="car-card">
        <div class="info">
          <div class="name">洒水车数量</div>
          <div class="num-box">
            <span class="num">16</span>
            <span class="unit">辆</span>
          </div>
        </div>
      </div>
      <div class="now-card">
        <div class="info">
          <div class="name">今日作业次数</div>
          <div class="num-box">
            <span class="num">16</span>
            <span class="unit">次</span>
          </div>
        </div>
      </div>
      <div class="total-card">
        <div class="info">
          <div class="name">累计作业次数</div>
          <div class="num-box">
            <span class="num">16</span>
            <span class="unit">次</span>
          </div>
        </div>
      </div>
    </div>
  </CusCard>
</template>

<script>
import CusCard from './CusCard.vue'
export default {
  components: {
    CusCard
  },
  data() {
    return {}
  },
  methods: {
    tabClick(item) {
      console.log(item)
    }
  }
}
</script>

<style lang="scss" scoped>
@mixin card-style($width, $height, $url) {
  width: $width;
  height: $height;
  background-image: url($url);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
@mixin info-style {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@mixin num-style {
  font-size: 24px;
  font-weight: 600;
  background: linear-gradient(180deg, #fff 24.14%, #7aacff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@mixin unit-style {
  color: #b1b2b6;
  font-size: 14px;
  font-weight: 400;
  margin-left: 4px;
}

.carMonitor-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  gap: 15px;
  .car-card {
    @include card-style(366px, 101px, '../images/car-bg-1.png');
    .info {
      @include info-style;
      padding-left: 123px;
      padding-right: 13px;
      .name {
        margin-top: 10px;
        color: #6098f0;
        font-size: 16px;
        font-weight: 500;
      }
      .num-box {
        margin-top: 10px;
        .num {
          @include num-style;
        }
        .unit {
          @include unit-style;
        }
      }
    }
  }
  .now-card {
    @include card-style(366px, 50px, '../images/car-bg-2.png');
    .info {
      @include info-style;
      padding-left: 68px;
      padding-right: 13px;
      .name {
        color: #6098f0;
        font-size: 16px;
        font-weight: 500;
      }
      .num-box {
        .num {
          @include num-style;
        }
        .unit {
          @include unit-style;
        }
      }
    }
  }

  .total-card {
    @include card-style(366px, 50px, '../images/car-bg-3.png');
    .info {
      @include info-style;
      padding-left: 68px;
      padding-right: 13px;
      .name {
        color: #6098f0;
        font-size: 16px;
        font-weight: 500;
      }
      .num-box {
        .num {
          @include num-style;
        }
        .unit {
          @include unit-style;
        }
      }
    }
  }
}
</style>
